package com.testtask.rightandabove.validate;

import java.lang.annotation.Documented;
import static java.lang.annotation.ElementType.FIELD;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
 *
 * @author <a href="mailto:avereshchaga@gmail.com">Vereshchaga Alexey</a>
 */
@Target({FIELD})
@Retention(RUNTIME)
@Constraint(validatedBy = XMLFileCorrectValidator.class)
@Documented
public @interface XMLFileCorrect {

    public static final String MESSAGE = "The file has incorrect content";

    public abstract String message() default MESSAGE;

    public abstract Class<?>[] groups() default {};

    public abstract Class<? extends Payload>[] payload() default {};

    @Target({FIELD})
    @Retention(RUNTIME)
    @Documented
    public @interface List {

        XMLFileCorrect[] value();
    }
}
